package com.xiaolin.spring.xml;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @ClassName DemoTest
 * @Description TODO
 * @Detail detail
 * @Author MyPC
 * @Date 2020/10/27
 * @Version 1.0
 */
public class DemoTest {
    public static void main(String[] args) {
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("demo.xml");
        DemoTest demo = applicationContext.getBean("demo", DemoTest.class);
        DemoTest demo111 = applicationContext.getBean("demo111", DemoTest.class);
        DemoTest yaya = applicationContext.getBean("yaya", DemoTest.class);
        DemoTest lala = applicationContext.getBean("lala", DemoTest.class);
        DemoTest tata = applicationContext.getBean("tata", DemoTest.class);
        DemoTest lele = applicationContext.getBean("lele", DemoTest.class);
        DemoTest myDemo = applicationContext.getBean("myDemo", DemoTest.class);
        System.out.println(demo);
        System.out.println(demo111);
        System.out.println(yaya);
        System.out.println(lala);
        System.out.println(tata);
        System.out.println(lele);
        System.out.println(myDemo);
    }
}
